<Window x:Class="ICSharpCode.XamlBinding.PowerToys.Dialogs.SelectSourceClassDialog"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:local="clr-namespace:ICSharpCode.XamlBinding.PowerToys.Dialogs"
    xmlns:sd="http://icsharpcode.net/sharpdevelop/core"
    xmlns:widgets="http://icsharpcode.net/sharpdevelop/widgets"
    Title="Select Source Class" Height="500" Width="700"
	Style="{x:Static sd:GlobalStyles.DialogWindowStyle}"
	WindowStartupLocation="CenterScreen" WindowStyle="ToolWindow">
	<Window.Resources>
		<local:SelectionConverter x:Key="selectionConverter" />
	</Window.Resources>
	<DockPanel>
		<TextBlock Margin="3" TextWrapping="Wrap" DockPanel.Dock="Top" Text="Select the source class for the new business form. If the desired class does not appear in the list, please ensure that all required references are added and rebuild your project. Abstract and static classes are excluded from the list." />
		<StatusBar DockPanel.Dock="Bottom">
			<TextBlock Text="{Binding Items.Count, ElementName=lvClasses, StringFormat=Count: {0}}" />
		</StatusBar>
		<widgets:UniformGridWithSpacing Columns="2" DockPanel.Dock="Bottom" HorizontalAlignment="Center" Margin="3">
			<Button x:Name="btnOK" Content="{sd:Localize Global.OKButtonText}" Click="BtnOKClick" IsEnabled="{Binding SelectedIndex, ElementName=lvClasses, Converter={StaticResource selectionConverter}}" Style="{x:Static sd:GlobalStyles.ButtonStyle}" />
			<Button x:Name="btnCancel" Content="{sd:Localize Global.CancelButtonText}" Click="BtnCancelClick" Style="{x:Static sd:GlobalStyles.ButtonStyle}" />
		</widgets:UniformGridWithSpacing>
		<TextBox Margin="3" DockPanel.Dock="Top" x:Name="txtFilter" TextChanged="TxtFilterTextChanged" />
		<ListBox x:Name="lvClasses" Margin="3">
			<ListBox.ItemTemplate>
				<DataTemplate>
					<TextBlock Text="{Binding Name}" />
				</DataTemplate>
			</ListBox.ItemTemplate>
		</ListBox>
	</DockPanel>
</Window>